package com.jiang.mvc.service;

import com.jiang.mvc.bean.User;
import com.jiang.mvc.dao.UserDao;

public class UserService {
    public String loginService(String zhanghao,String mima){
        UserDao userDao = new UserDao ( );
        User user = userDao.loginDao (zhanghao);
        if (user==null){
            return "用户不存在";
        }
        if (!user.getMima ().equals(mima)){
            return "密码错误";
        }

        return "成功";
    }
}
